<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<script>

var a=[[1,2,3],[4,5,6],[7,8,9]];
		for(var i in a){
		for(var x of a[i]){
			document.write(x+" ");
		}
		    document.write("</br>");
	}
	
	var a=[[1,2,3],[3,5,6],[7,4,5],[9,5,8]];
		for(var i in a){
		for(var x of a[i]){
			document.write(x+" ");
		}
		    document.write("</br>");
	}
	
	var arr=[[1,2,3],[3,5,6],[7,4,5],[9,5,8]];
	var res=[];
	var childArr=[];
	for(var i in arr){
		childArr.push();
		
	}
	
	var arr=[[1,2,3],[3,5,6],[7,4,5],[9,5,8]];
	var res=[];
	var childArr=[];
	for(var j in arr[0]){
		childArr=[];
		for(var i in arr){
		    childArr.push(arr[i][j]);
	}
	        res.push(childArr);
    }
 for (var x of res){
		 document.write(x+"</br>");
	 }
	
		var arr=[[1,2,3],[3,5,6],[7,4,5],[9,5,8]];
	var res=arr[0].map(function(currentValue,index,currentArr){
				return arr.map(function(cv,i,ca){
					return cv[index];
				});

			});
			
			
			
			for (var x of res){
					 document.write(x+"</br>");
			}
			
</script>
</body>
</html>
